package lab02.test30;

import java.util.Scanner;

/**
 * Created by 阿阿阿阿豪丶 on 2017/11/21.
 */
public class Test {
    public static void main(String[] args) {
        double[] scores = new double[5];
        double sum = 0;
        Scanner scanner = new Scanner(System.in);
        for (int i = 0; i < 5; i++) {
            System.out.println("请输入第"+ (i+1) +"门课的成绩");
            scores[i] = scanner.nextDouble();
        }

        for (int i = 0; i < 5; i++) {
            sum += scores[i];
        }
        System.out.println("平均分为" + sum / 5);
    }
}